#this file is used for Android compile configuration

############################################################################
CEDARX_EXT_CFLAGS :=
# manually config CEDARX_ADAPTER_VERSION according to internal version. now default set to v1.5release(V15).
CEDARX_ADAPTER_VERSION := 5
CEDARX_EXT_CFLAGS += -DCEDARX_ADAPTER_VERSION=5

CEDARX_DEBUG_ENABLE := N
ifeq ($(CEDARX_DEBUG_ENABLE), Y)
CEDARX_DEBUG_FRAMEWORK := Y
CEDARX_DEBUG_CEDARV := Y
CEDARX_DEBUG_DEMUXER := Y
else
CEDARX_DEBUG_FRAMEWORK := N
CEDARX_DEBUG_CEDARV := N
CEDARX_DEBUG_DEMUXER := N
endif

############################################################################
ifeq ($(PLATFORM_VERSION),2.3.4)
AV_BASE_PATH := base
TEMP_COMPILE_DISABLE := false
endif
ifeq ($(PLATFORM_VERSION),4.0.1)
AV_BASE_PATH := base
TEMP_COMPILE_DISABLE := false
endif
ifeq ($(PLATFORM_VERSION),4.0.3)
AV_BASE_PATH := base
TEMP_COMPILE_DISABLE := false
endif
ifeq ($(PLATFORM_VERSION),4.0.4)
AV_BASE_PATH := base
TEMP_COMPILE_DISABLE := false
endif
ifeq ($(PLATFORM_VERSION),4.1.1)
AV_BASE_PATH := av
TEMP_COMPILE_DISABLE := true
endif
ifeq ($(PLATFORM_VERSION),4.2.1)
AV_BASE_PATH := av
TEMP_COMPILE_DISABLE := true
endif
ifeq ($(PLATFORM_VERSION),4.2.2)
AV_BASE_PATH := av
TEMP_COMPILE_DISABLE := true
endif
ifeq ($(PLATFORM_VERSION),4.4)
AV_BASE_PATH := av
TEMP_COMPILE_DISABLE := true
endif
ifeq ($(PLATFORM_VERSION),4.4.2)
AV_BASE_PATH := av
TEMP_COMPILE_DISABLE := true
endif

ifeq ($(PLATFORM_VERSION),2.3.4)
CEDARX_ANDROID_VERSION := 4
CEDARX_ANDROID_CODE := GIN
CEDARX_RTSP_VERSION := 2
CEDARX_USE_SFTDEMUX := N
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=4
endif
ifeq ($(PLATFORM_VERSION),4.0.1)
CEDARX_ANDROID_VERSION := 6
CEDARX_ANDROID_CODE := ICS
CEDARX_RTSP_VERSION := 3
CEDARX_USE_SFTDEMUX := N
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=6
endif
ifeq ($(PLATFORM_VERSION),4.0.3)
CEDARX_ANDROID_VERSION := 6
CEDARX_ANDROID_CODE := ICS
CEDARX_RTSP_VERSION := 4
CEDARX_USE_SFTDEMUX := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=6
endif
ifeq ($(PLATFORM_VERSION),4.0.4)
CEDARX_ANDROID_VERSION := 6
CEDARX_ANDROID_CODE := ICS
CEDARX_RTSP_VERSION := 4
CEDARX_USE_SFTDEMUX := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=6
endif
ifeq ($(PLATFORM_VERSION),4.1.1)
CEDARX_ANDROID_VERSION := 7
CEDARX_ANDROID_CODE := JB
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=7
endif
ifeq ($(PLATFORM_VERSION),4.2.1)
CEDARX_ANDROID_VERSION := 8
CEDARX_ANDROID_CODE := JB42
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=8
endif
ifeq ($(PLATFORM_VERSION),4.2.2)
CEDARX_ANDROID_VERSION := 9
CEDARX_ANDROID_CODE := JB42
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=9
endif
ifeq ($(PLATFORM_VERSION),4.4)
CEDARX_ANDROID_VERSION := 10
CEDARX_ANDROID_CODE := KK44
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_USE_HTTPLIVE_STREAM := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=10
endif
ifeq ($(PLATFORM_VERSION),4.4.2)
CEDARX_ANDROID_VERSION := 10
CEDARX_ANDROID_CODE := KK44
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_USE_HTTPLIVE_STREAM := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=10
endif
ifeq ($(PLATFORM_VERSION),4.4.4)
CEDARX_ANDROID_VERSION := 11
CEDARX_ANDROID_CODE := KK44
CEDARX_RTSP_VERSION := 5
CEDARX_USE_SFTDEMUX := Y
CEDARX_USE_HTTPLIVE_STREAM := Y
CEDARX_TOP := $(TOP)/device/mixtile/loftq/sun6i/aw/CedarX-Projects/CedarX
CEDARX_EXT_CFLAGS += -DCEDARX_ANDROID_VERSION=10
endif
CEDARX_PREBUILD_LIB_PATH := LIB_$(CEDARX_ANDROID_CODE)_$(CEDARX_CHIP_VERSION)

############################################################################

CEDARX_ENABLE_MEMWATCH := N

ifeq ($(CEDARX_CHIP_VERSION), F25)
CEDAR_ENCODER_VERSION := F23
else
CEDAR_ENCODER_VERSION := $(CEDARX_CHIP_VERSION)
endif

ifeq ($(CEDARX_CHIP_VERSION),F33)
  CEDARX_USE_SUNXI_MEM_ALLOCATOR := Y
else
  CEDARX_USE_SUNXI_MEM_ALLOCATOR := N
endif

ifeq ($(CEDARX_CHIP_VERSION),F51)
  CEDARX_USE_SUNXI_MEM_ALLOCATOR := Y
endif

CEDARX_EXT_CFLAGS +=-D__OS_ANDROID -D__CHIP_VERSION_$(CEDARX_CHIP_VERSION)
CEDARX_EXT_CFLAGS +=-D__CDX_ENABLE_SUBTITLE 
CEDARX_EXT_CFLAGS +=-D__CDX_ENABLE_DRM

ifeq ($(CEDARX_ENABLE_MEMWATCH),Y)
CEDARX_EXT_CFLAGS +=-DMEMWATCH -DMEMWATCH_STDIO -D__CDX_MEMWATCH -I${CEDARX_TOP}/libexternal/memwatch-2.71
endif

